package com.ymttest.database.sqlwapper;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.ymt.database.SqlManager;
import com.ymttest.utils.EnvSetup;

public class UserLogoWapper {
	SqlManager manage;

	public UserLogoWapper() {
		manage = new SqlManager("ymt" + EnvSetup.getEnv());
	}
	
	/**
	 * 根据userId获取头像信息
	 * @param logoId
	 * @return
	 */
	public Map selectLogoByLogoId(String logoId){
		List<Map> userList = manage.getSelectResults(
				"com.ymttest.database.mapping.UserLogoMapper.selectLogoByLogoId", logoId);
		manage.commit();
		if (userList.size() > 0) {
			return userList.get(0);
		}
		return null;
	} 
	public Map selectLogoByUid(String uid){
		Map m=new HashMap();
		m.put("uid", uid);
		List<Map> userList = manage.getSelectResults(
				"com.ymttest.database.mapping.UserLogoMapper.selectLogoByUid", m);
		manage.commit();
		if (userList.size() > 0) {
			return userList.get(0);
		}
		return null;
	} 
}
